#ifndef INPUT_H
#define INPUT_H

#include <vector>
#include <algorithm>

#include <glm\glm.hpp>
#include <glad\glad.h>
#include <GLFW\glfw3.h>

#include "Util.h"

class Input {
public:
	static GLvoid Init(GLFWwindow* window);
	static GLboolean GetKeyDown(GLuint keyCode);
	static GLboolean GetKey(GLuint keyCode);
	static GLboolean GetKeyUp(GLuint keyCode);
	static GLvoid SetMouseCursor(GLint state);
	static GLboolean GetMouseButton(GLint state);

	static glm::vec2 mouseScroll;
	static glm::vec2 mousePosition;
private:
	static GLFWwindow* m_window;
	static GLboolean m_midMouseBtn;
	static GLboolean m_leftMouseBtn;
	static GLboolean m_rightMouseBtn;
	static std::vector<GLuint> m_pressKeys;

	static std::vector<GLint> m_mouseState;
	static GLvoid Mouse_Callback(GLFWwindow* window, double xpos, double ypos);
	static GLvoid Scroll_Callback(GLFWwindow* window, double xoffset, double yoffset);
	static GLvoid MouseClick_Callback(GLFWwindow* window, int button, int action, int mods);
};

#endif